//
//  GoogleMyMapRequest.m
//  iPhoneKML
//
//  Created by Benjamin Blundell on 03/11/2009.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "GoogleMyMapRequest.h"

#define DEBUG

@implementation GoogleMyMapRequest

-(id) initWithUser:(NSString*)user AndAuthToken:(NSString *)token AndMap:(NSString*)map{

//	NSString *url = [[NSString alloc] initWithFormat: @"http://maps.google.com/maps/feeds/maps/%@/full/%@", user,map];

	
	
#ifdef DEBUG
//	NSLog(@"Requesting Following Map Feed: %@", url);
#endif
	
	if (self = [super initWithBaseURL:@"http://maps.google.com/maps/feeds/maps/default/unlisted"]){
		
		// google header auth format:
		// Authorization: GoogleLogin auth=yourAuthToken
		NSString *auth = [[NSString alloc] initWithFormat: @"GoogleLogin auth=%@",token ];
#ifdef DEBUG
		NSLog(@"Header Auth Request: %@", auth);
#endif
		
		[headerVars setObject:auth forKey:@"Authorization"];
		
	}
	
	return self;

}


@end
